﻿<?php 
include "../../../lib/list.php";
include "barcode_check.php";

$p_no = $_POST['chk_no'];
?>
<script language="javascript">
window.onload = function ()
{
	print();
}
</script>
<style>
body {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 11px;
	line-height: 18px;
	height: 100%;
	color: #333333;
}
#frame{
	width:130px;
	padding : 8px;
	margin : 8px;
}

#title{
	height:23px;
}
#barcode{
	height:100px;
}

</style>
<body>
<table>
<?
for($i=0;$i<count($p_no);$i=$i+4){
	?>
	<tr>
	
	<?for($j=$i;$j<$i+4;$j++)
	{
		$query = "SELECT * FROM `uatp_product` where no = '$p_no[$j]' LIMIT 1";
		$result = mysql_query($query,$connect);
		$list = mysql_fetch_array($result);
		if(!$list){
		break;
		}
		$name = $list['productname'];
		$price = $list['price1'];
		$barcode=$list['barcode'];
		Code_Ean13($barcode);
	?>
	<td style="width:150px;font-size:11px;">
	<input type='text' size='40' value="<?=$name?>" readonly style="font-size:11px;width:130px;border:0px;"/><br>	
			<img src='barcode/<?=$barcode?>.jpg' width='130px' height='100px'/>
			<br>
			단가:<?=$price?>
	</td>
		<?
	}?>
	
	</tr>
	<?
}
mysql_query($query);
?>
</table>
</body>